﻿<UserControl x:Class="PrismFactory.SoftwareFactory.Views.CreateSolution.EnsureEntlibAssembliesPathPageView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" Height="499" Width="803" Loaded="UserControl_Loaded">
    <UserControl.Resources>
        <Style x:Key="textBoxInError" TargetType="{x:Type TextBox}">
            <Style.Triggers>
                <Trigger Property="Validation.HasError" Value="true">
                    <Setter Property="ToolTip" Value="{Binding (Validation.Errors)[0].ErrorContent, RelativeSource={x:Static RelativeSource.Self}}" />
                </Trigger>
            </Style.Triggers>
        </Style>
        <DataTemplate x:Key="AssembliesDataTemplate">
            <StackPanel>
                <TextBlock x:Name="nameText" Text="{Binding Name, Mode=TwoWay}" />
            </StackPanel>
            <DataTemplate.Triggers>
                <DataTrigger Binding="{Binding Exists, Mode=TwoWay}" Value="False">
                    <Setter TargetName="nameText" Property="Foreground" Value="Red"/>
                </DataTrigger>
            </DataTemplate.Triggers>
        </DataTemplate>
    </UserControl.Resources>
    <Canvas>
        <Label Content="Path of Entlib assemblies" Width="300" Height="25" Canvas.Top="12" Canvas.Left="12" />
        <TextBox x:Name="entlibAssembliesPathText" Width="366" IsReadOnly="False" Height="25" Text="{Binding EntlibAssembliesPath, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" Style="{StaticResource textBoxInError}" Canvas.Top="37" Canvas.Left="12" />
        <Button Content="..." Width="32" Height="25" Click="OnEntlibAssembliesButtonClick" Canvas.Left="382" Canvas.Top="37" d:LayoutOverrides="Height" />
    </Canvas>
</UserControl>